import {CreateBox} from './CreateBox.js'
//因为只多了个图片，所以直接继承CreatBox即可
class CreateImgBox extends CreateBox {
    constructor(select, data) {
        super(select, data)
        this.imgUrl = data.url
        this.render() //这里需要重新调用一下render()，与this指向有关
    }
    render() {
        super.render()
        let oimg = this.ele.querySelector("img")
        oimg.src = this.imgUrl
    }
}

export default CreateImgBox